package com.greedy.bulls.stock.common.exception;

import com.greedy.bulls.stock.common.exception.constants.IErrorCodeEnum;

/**
 * @Author: Yanxy
 * @Date: Created in:2023-07-12
 * Description: 基础工具模块-业务异常
 */
public class BusinessException extends AbstractException {

    /**
     *
     */
    private static final long serialVersionUID = -1L;

    /**
     * 错误码
     */
    private IErrorCodeEnum errorCodeEnum;


    public BusinessException(IErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getCode() + ":" + errorCodeEnum.getMessage());
        this.errorCodeEnum = errorCodeEnum;
    }

    public IErrorCodeEnum getErrorCodeEnum() {
        return errorCodeEnum;
    }

}
